#ifndef CKEYBOARDEVENT_H_
#define CKEYBOARDEVENT_H_

#include "cevent.h"
#include "ckeyidentifications.h"

/**
 * CKeyboardEvent - class which stores informations about key press
 * @author Michal Rost
 * @date 04.04.2008
 */
class CKeyboardEvent : public CEvent {
public:
  CKeyboardEvent(unsigned short unicode, unsigned short scancode,
      unsigned short keyId, unsigned char state) {
    this->unicode = unicode;
    this->scancode = scancode;
    this->keyId = keyId;
    this->state = state;
  }
  unsigned char getState() const {
    return state;
  }
  unsigned short getUnicode() const {
    return unicode;
  }
  unsigned short getKeyId() const {
    return keyId;
  }
  unsigned short getScancode() const {
    return scancode;
  }
  static string getClassName() {
    return "CKeyboardEvent";
  }
  static const unsigned char KEY_DOWN = 0;
  static const unsigned char KEY_UP = 1;
protected:
  unsigned char state;
  unsigned short keyId;
  unsigned short scancode;
  unsigned short unicode;
};

#endif
